package com.sifeng.test;

import com.sifeng.enums.FileTypeEnum;
import com.sifeng.utils.MyUtils;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * 创建体温登记表
 * @author yang_gsh
 */
public class CreateTemperatureRegisterTemplate {
    private XSSFWorkbook readExcel(String path) throws IOException {
        InputStream iStream = new FileInputStream(path);
        return new XSSFWorkbook(iStream);
    }

    private void writeExcel(String path, XSSFWorkbook xssfWorkbook, String[] location, String[] values) throws IOException {
        FileOutputStream fileOutputStream = new FileOutputStream(path);

        xssfWorkbook.write(fileOutputStream);
        fileOutputStream.flush();
        xssfWorkbook.close();
    }

    public static void main(String[] args) {
        String basePath = "\\\\10.9.17.137\\public\\otherProject\\体温表\\四（2）班附件1\\四（2）班附件1\\";
        List<String> directoryList = MyUtils.readDirectory(basePath, FileTypeEnum.FILE);
        directoryList.forEach(directory -> {
            System.out.println(directory);
        });

    }
}
